﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class weblogin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
  
        datos.Service owsGD = new datos.Service();
        System.Data.DataSet dsUsuarios = new System.Data.DataSet(); 
        owsGD.clasificarUsuario (txtusuarioid.Text, txtclave.Text, ref dsUsuarios);
        formato oVentana = new formato();
        if (dsUsuarios.Tables[0].Rows.Count > 0) {
            Session["IdCliente"] = dsUsuarios.Tables[0].Rows[0][0].ToString();
            Session["nomCliente"] = dsUsuarios.Tables[0].Rows[0][2].ToString()+
                " " + dsUsuarios.Tables[0].Rows[0][1].ToString(); 
            Response.Redirect("webMenu.aspx");  } 
        else 
             oVentana.MessageBox("Usuario No existe....", this);
    }
    
}
